package com.agency8x.controller;

import com.agency8x.interceptor.CheckLoginInterceptor;
import com.agency8x.model.TransactionDetailModel;
import com.jfinal.aop.Before;
import com.jfinal.core.Controller;
import com.jfinal.kit.StrKit;

/**
 * 资金交易明细记录页面控制器
 * 
 * @author SoChishun
 *
 */
@Before(CheckLoginInterceptor.class)
public class TransactionDetailController extends Controller {
	
	public void index() {
		String word = this.getPara("word", "");
		String date1 = this.getPara("date1", "");// 起始时间
		String date2 = this.getPara("date2", "");// 终止时间
        this.setAttr("word", word);
        this.setAttr("date1", date1);
        this.setAttr("date2", date2);
		setAttr("listPage",
				TransactionDetailModel.me.paginate(getParaToInt(0, 1), 10, word, date1, date2));
		// 设置传入分页的url参数
		this.setAttr("append", "?word=" + word + "&date1=" + date1 + "&date2=" + date2);
		this.render("index.html");
	}
}
